package geektime.spring.springbucks;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(
    name="demo-service",
    url="http://localhost:8080/"/*,
    configuration=FeignInterceptor.class,
    fallback=Service.DefaultFallback.class*/
)
public interface Service {

    @RequestMapping(value = "/coffee/getJson/{id}", method = RequestMethod.GET)
    public String get(@PathVariable("id") Long id);
}
